<?php
// +----------------------------------------------------------------------
// | WoShiMaiJia Projcet 
// +----------------------------------------------------------------------
// | Copyright (c) 2010 http://www.woshimaijia.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: xinqiyang <517577550@qq.com>
// +----------------------------------------------------------------------
/**
 * 
 * @author xinqiyang
 * @date   2010-5-12
 *
 */
class ShowCommentWidget extends Widget {
	public function render($data)
	{
		$parameter = $data['count'];
		$temparray = array();
		for($i=0;$i<=$parameter;$i++)
		{
			array_push($temparray,'No.'.$i);
		}
		//这里还是得先定义数组
		$data['data'] = $temparray;
		//$data['data'] = array('aaa','bbb','ccc');
		//这里关键终于拼装我们所需要的$data,然后对这些数据进行解析拼接生成html数据
		$content = $this->renderFile('comment',$data);
		//$tempcontent = W('ShowComment',array('count'=>5),true);
		return $content;
	}
}

 
?>